package plus.easydo.easypush.dingtalk.service;

import com.taobao.api.ApiException;
import plus.easydo.easypush.dingtalk.DingTalkWorkNoticeEnum;
import plus.easydo.easypush.dingtalk.model.DingTalkSelectUsers;
import plus.easydo.easypush.dingtalk.model.DingTalkWorkNoticeMessage;
import plus.easydo.easypush.entity.ChannelInfo;


/**
 * @author laoyu
 * @version 1.0
 * @date 2022/2/24
 */
public interface DingTalkService {

    /**
     * 钉钉工作通知
     *
     * @param dingTalkSelectUsers dingTalkSelectUsers
     * @param message message
     * @param dingTalkWorkNoticeEnum dingTalkWorkNoticeEnum
     * @return boolean
     * @author laoyu
     * @throws ApiException e
     * @date 2022/2/25
     */
    boolean workNotice(DingTalkSelectUsers dingTalkSelectUsers, DingTalkWorkNoticeMessage message, DingTalkWorkNoticeEnum dingTalkWorkNoticeEnum, ChannelInfo channelInfo) throws ApiException;

    /**
     * 推送钉钉工作通知
     *
     * @param channel channel
     * @param title title
     * @param text text
     * @return java.lang.Boolean
     * @author laoyu
     * @date 2022/2/26
     */
    Boolean pushText(ChannelInfo channel, String title, String text) throws ApiException;
}
